import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/json/format'
  },
  {
    path: '/json/format',
    name: 'json-format',
    component: () => import('../components/json/JsonFormatter.vue')
  },
  {
    path: '/json/compress',
    name: 'json-compress',
    component: () => import('../components/json/JsonCompressor.vue')
  },
  {
    path: '/json/to-xml',
    name: 'json-to-xml',
    component: () => import('../components/json/JsonToXml.vue')
  },
  {
    path: '/image/compress',
    name: 'image-compress',
    component: () => import('../components/image/ImageCompressor.vue')
  },
  {
    path: '/image/table',
    name: 'image-table',
    component: () => import('../components/image/TableRecognizer.vue')
  },
  {
    path: '/image/background',
    name: 'image-background',
    component: () => import('../components/image/ImageBackground.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 